An Imperative Extension to Alloy and a Compiler for its Execution
نویسندگان
چکیده
This thesis presents an extension of the Alloy specification language with the standard imperative programming constructs, allowing for the natural specification of dynamic systems. Using this extension, programmers can express stateful behavior directly, mixing declarative and imperative styles as desired. A relational semantics for the new imperative constructs will ensure that specifications written using the extension are translatable into the original Alloy language, allowing their analysis using the existing Alloy Analyzer. The thesis also presents a compiler from the extended Alloy language to Prolog so that specifications may be efficiently executed. While the Alloy Analyzer’s SAT-based analysis engine is incredibly fast in exploring a wide search tree, Prolog’s unificationbased strategy has the ability to delve very deeply into highly constrained search trees. Many specifications of dynamic systems have this property, making Prolog a perfect engine for executing them. This combination of a language extension and a compiler for its execution represents an end-to-end solution for programming. The Alloy Analyzer allows the programmer to check properties of a high-level specification of the desired behavior, and the Prolog-based compiler allows the execution of that specification; if the compiled program is not fast enough, the programmer may refine the specification to make it faster, and the Alloy Analyzer will check that the refinement step has not introduced errors. Thesis Supervisor: Daniel Jackson Title: Professor
منابع مشابه
Applications and extensions of Alloy: past, present and future
Alloy is a declarative language for lightweight modelling and analysis of software. The core of the language is based on first-order relational logic, which offers an attractive balance between analysability and expressiveness. The logic is expressive enough to capture the intricacies of real systems, but is also simple enough to support fully automated analysis with the Alloy Analyzer. The Ana...
متن کاملFrom Relational Specifications to Logic Programs
This paper presents a compiler from expressive, relational specifications to logic programs. Specifically, the compiler translates the Imperative Alloy specification language to Prolog. Imperative Alloy is a declarative, relational specification language based on first-order logic and extended with imperative constructs; Alloy specifications are traditionally not executable. In spite of this th...
متن کاملFuzzy gain scheduling of PID controller for stiction compensation in pneumatic control valve
Inherent nonlinearities like, deadband, stiction and hysteresis in control valves degenerate plant performance. Valve stiction standouts as a more widely recognized reason for poor execution in control loops. Measurement of valve stiction is essential to maintain scheduling. For industrial scenarios, loss of execution due to nonlinearity in control valves is an imperative issue that should be t...
متن کاملAn Imperative Extension to Alloy
We extend the Alloy language with the standard imperative constructs; we show the mix of declarative and imperative constructs to be useful in modeling dynamic systems. We present a translation from our extended language to the existing first-order logic of the Alloy Analyzer, allowing for efficient analysis of models.
متن کاملαRby - An Embedding of Alloy in Ruby
We present αRby—an embedding of the Alloy language in Ruby— and demonstrate the benefits of having a declarative modeling language (backed by an automated solver) embedded in a traditional object-oriented imperative programming language. This approach aims to bring these two distinct paradigms (imperative and declarative) together in a novel way. We argue that having the other paradigm availabl...
متن کامل